<template>
    <div class="overflow-hidden w-full h-[calc(100vh-160px)]">
        <Fenxi @change="d => refresh(d)" @click="clickItem" />
        <PointList :days="days" ref="pointListRef" />
    </div>
</template>
<script setup lang="ts">
import Fenxi from '@/components/FenXi/index.vue';
import PointList from './components/PointList.vue';
const route = useRoute();
const router = useRouter();
const pointListRef = ref();
const days = ref(0);
const refresh = (d: number) => {
    days.value = d;
};
const clickItem = (item: any) => {
    pointListRef.value.filterProject(item.name);
};

onMounted(() => {
    const query = route.query;
    if (query.name) {
        router.push({ name: 'data_report_today' });
        // setTimeout(() => {
        pointListRef.value.filterProject(query.name);
        // }, 1500);
    }
});
</script>
<style lang="scss" scoped></style>
